package com.vhall.component.service.room.converter;

import com.vhall.component.entity.room.dto.RoomJoinsCacheDTO;
import com.vhall.component.entity.room.entity.RoomJoinsEntity;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * 参会成员类实体对象间转换
 *
 * @author yuanzh
 */
@Mapper(componentModel = "spring")
public interface RoomJoinsConverter {

    /**
     * 转换缓存参会成员为参会实体对象
     *
     * @param cache 缓存参会对象
     * @return 参会对象
     */
    RoomJoinsEntity to(RoomJoinsCacheDTO cache);

    /**
     * 转换缓存参会成员列表为参会实体列表
     *
     * @param cacheList 缓存参会成员
     * @return 参会实体列表
     */
    List<RoomJoinsEntity> tos(List<RoomJoinsCacheDTO> cacheList);

}
